package com.ymttest.common.order.userquery.config;


import org.springframework.stereotype.Component;

import com.ymttest.common.order.constants.Constants;
import com.ymttest.common.order.userquery.util.Utils;

/**
 * @author luoshiqian 2017/1/10 10:59
 */
@Component
public class BizConfig {

    private String takeOrder = "0.01:00:00";

    private String deliver = "15.00:03:00";

    private String confirmReceived = "15.00:05:00";

    private String turnover = "15.00:10:00";

    private String logisticsUrl = "http://logisticsinfo.iapi.ymatou.com";
    
    public String getTakeOrder() {
		return takeOrder;
	}

	public void setTakeOrder(String takeOrder) {
		this.takeOrder = takeOrder;
	}

	public String getDeliver() {
		return deliver;
	}

	public void setDeliver(String deliver) {
		this.deliver = deliver;
	}

	public String getConfirmReceived() {
		return confirmReceived;
	}

	public void setConfirmReceived(String confirmReceived) {
		this.confirmReceived = confirmReceived;
	}

	public String getTurnover() {
		return turnover;
	}

	public void setTurnover(String turnover) {
		this.turnover = turnover;
	}

	public String getLogisticsUrl() {
		return logisticsUrl;
	}

	public void setLogisticsUrl(String logisticsUrl) {
		this.logisticsUrl = logisticsUrl;
	}

	public void onApplicationEvent() {
        Constants.TakeOrder = Utils.convertPeriodFromString(this.getTakeOrder());
        Constants.Deliver = Utils.convertPeriodFromString(this.getDeliver());
        Constants.ConfirmReceived = Utils.convertPeriodFromString(this.getConfirmReceived());
        Constants.Turnover = Utils.convertPeriodFromString(this.getTurnover());
    }
    
}
